package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;
import java.util.stream.Stream;

public interface MovementApi {

    //查询自己的动态
    PageResult findByuserId(Long userId, Integer page, Integer pagesize);

    //发布动态
    void publish(Movement movement);

    //查询好友动态
    List<Movement> findFriendMovements(Integer page, Integer pagesize, Long userId);

    //随机获取多条动态数据
    List<Movement> randomMovements(Integer pagesize);

    //个根据ids数组查询动态
    List<Movement> findMovementsByPids(List<Long> pids);

    //根据动态id查询动态详情
    Movement findById(String movementId);

    //根据id查询动态列表
    PageResult findByUserIdList(Integer page, Integer pagesize, Long uid, Integer state);


    void update(String movementId, Integer state);
}
